# Contributor: 6543 <6543@obermui.de>
# Maintainer: 6543 <6543@obermui.de>
pkgname=py3-immutabledict
pkgver=4.1.0
pkgrel=0
pkgdesc="Fork of frozendict, an immutable wrapper around dictionaries for Python3"
url="https://github.com/corenting/immutabledict"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-poetry-core py3-gpep517 py3-installer"
checkdepends="python3 py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/corenting/immutabledict/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir"/immutabledict-$pkgver

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
a2a70cda9c837879ece3494f29e304625e25a6593d38dd7caafea6b0eb92c9b2b030ed9c48d7a9716b65ad7ea02cbc40410063df43d3aee12cecefbc8ff58127  py3-immutabledict-4.1.0.tar.gz
"
